#include "Binding/BoundUnaryOperator.hpp"
#include <memory>

#define STR(s) #s

#define MakeKindName(kind)          \
    {                               \
        BoundUnaryOperatorKind::kind, STR(kind) \
    }

std::map<BoundUnaryOperatorKind, std::string> BoundUnaryOperator::KindAllName
{
    MakeKindName(Error),
    MakeKindName(Identity),
    MakeKindName(Negation),
    MakeKindName(OnesComplement),
    MakeKindName(LogicalNegation)
    
};

#undef STR
#undef MakeKindName
std::vector<SharedBoundUnaryOperator> BoundUnaryOperator::_operators = {
    std::make_shared<BoundUnaryOperator>(SyntaxKind::Plus, BoundUnaryOperatorKind::Identity, TypeSymbol::GetInt()),
    std::make_shared<BoundUnaryOperator>(SyntaxKind::Minus, BoundUnaryOperatorKind::Negation, TypeSymbol::GetInt()),

    std::make_shared<BoundUnaryOperator>(SyntaxKind::Bang, BoundUnaryOperatorKind::Negation, TypeSymbol::GetBool()),
    std::make_shared<BoundUnaryOperator>(SyntaxKind::Tilde, BoundUnaryOperatorKind::OnesComplement, TypeSymbol::GetInt()),

};
